import http from '@/utils'

class Contract {
    // 获取列表  必传module 为module接口里的code
    getList(reload) {
        let url = '/contract/index';
        return http.get(url, reload)
    }

    // 新增
    createContent(reload) {
        let url = '/contract/create';
        return http.post(url, reload)
    }

    // 编辑
    editContent(reload) {
        let url = '/contract/edit';
        return http.post(url, reload)
    }

    // 详情 detail 参数 id
    getContentDetail(reload) {
        let url = '/contract/detail';
        return http.get(url, reload)
    }

    // 删除
    deleteContent(reload) {
        let url = '/contract/delete';
        return http.post(url, reload)
    }

    // 更新唯一字段
    updateOnlyfield(reload) {
        let url = '/contract/onlyfield';
        return http.post(url, reload)
    }

    // 所有类型 contract_type 用于选择下拉
    getContractType(reload) {
        let url = '/contract/contract_type';
        return http.post(url, reload)
    }

    // 所有学员 student 用于选择下拉
    getStudent(reload) {
        let url = '/contract/student';
        return http.post(url, reload)
    }
    
    // 所有潜客customer 用于选择下拉
    getCustomer(reload) {
        let url = '/contract/customer';
        return http.post(url, reload)
    }

    // 首页 home
    getContractHome(reload) {
        let url = '/contract/home';
        return http.get(url, reload)
    }

    // 列表上方合同动态
    getContractStatus(reload) {
        let url = '/contract/contract_status';
        return http.get(url, reload)
    }

    // 课程列表
    getClassList(reload) {
        let url = '/contract/classlist';
        return http.get(url, reload)
    }

    // 获取学员初始级别
    getptResult(reload) {
        let url = '/contract/getptresult';
        return http.get(url, reload)
    }
}

export default new Contract()